<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>simvoc.core.grid_sim.Grid</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="simvoc-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >SimVOC</th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="simvoc-module.html">Package&nbsp;simvoc</a> ::
        <a href="simvoc.core-module.html">Package&nbsp;core</a> ::
        <a href="simvoc.core.grid_sim-module.html">Module&nbsp;grid_sim</a> ::
        Class&nbsp;Grid
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Grid</h1><p class="nomargin-top"><span class="codelink"><a href="simvoc.core.grid_sim-pysrc.html#Grid">source&nbsp;code</a></span></p>
<center>
<center>  <map id="uml_class_diagram_for_simvoc_c_13" name="uml_class_diagram_for_simvoc_c_13">
<area shape="rect" id="node26" href="simvoc.core.grid_sim.Grid-class.html#__init__" title="x.__init__(...) initializes x; see x.__class__.__doc__ for signature" alt="" coords="17,39,715,57"/>
<area shape="rect" id="node26" href="simvoc.core.grid_sim.Grid-class.html#add_site" title="Adds an existing Site object to the Grid (and metascheduler, if used)." alt="" coords="17,57,715,76"/>
<area shape="rect" id="node26" href="simvoc.core.grid_sim.Grid-class.html#remove_site" title="Removes a Site from the Grid (and metascheduler, if used) using a reference to the Site object." alt="" coords="17,76,715,95"/>
<area shape="rect" id="node26" href="simvoc.core.grid_sim.Grid-class.html#get_site" title="Returns: &#160;reference to a Site object known to the grid, or raises an Exception if no &#160;such site exists" alt="" coords="17,95,715,113"/>
<area shape="rect" id="node26" href="simvoc.core.grid_sim.Grid-class.html#register_cluster" title="Registers a Cluster object with the cluster tracking map." alt="" coords="17,113,715,132"/>
<area shape="rect" id="node26" href="simvoc.core.grid_sim.Grid-class.html#get_waiting_count" title="Returns total number of jobs waiting across all sites" alt="" coords="17,132,715,151"/>
<area shape="rect" id="node26" href="simvoc.core.grid_sim.Grid-class.html#get_total_queue_size" title="Returns total queue size (waiting+running) across all sites" alt="" coords="17,151,715,169"/>
<area shape="rect" id="node26" href="simvoc.core.grid_sim.Grid-class.html#get_completed_count" title="Returns total number of jobs completed on all sites" alt="" coords="17,169,715,188"/>
<area shape="rect" id="node26" href="simvoc.core.grid_sim.Grid-class.html#submit_job" title="Submits a job to a target Site, if the Site name matches a Site currently &#160;known to the Grid." alt="" coords="17,188,715,207"/>
<area shape="rect" id="node26" href="simvoc.core.grid_sim.Grid-class.html#add_submit_event" title="Schedules a job submission event at a time not in the past." alt="" coords="17,207,715,225"/>
<area shape="rect" id="node26" href="simvoc.core.grid_sim.Grid-class.html#add_ce" title="Creates a new Site and adds the Site to the Grid." alt="" coords="17,225,715,244"/>
<area shape="rect" id="node26" href="simvoc.core.grid_sim.Grid-class.html#remove_ce" title="Remove a Site from the Grid." alt="" coords="17,244,715,263"/>
<area shape="rect" id="node26" href="simvoc.core.grid_sim.Grid-class.html#resize_cluster" title="Resize an existing Cluster or create, register, and size a new Cluster, if &#160;the cluster name is not already known to the Grid." alt="" coords="17,263,715,281"/>
<area shape="rect" id="node1" href="simvoc.core.grid_sim.Grid-class.html" title="Top&#45;level grid simulation component: handles dynamic changes to the grid configuration as well as high&#45;level job routing." alt="" coords="5,6,725,287"/>
</map>
  <img src="uml_class_diagram_for_simvoc_c_13.gif" alt='' usemap="#uml_class_diagram_for_simvoc_c_13" ismap="ismap" class="graph-without-title" />
</center>
</center>
<hr />
<p>Top-level grid simulation component: handles dynamic changes to the 
  grid configuration as well as high-level job routing.</p>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.grid_sim.Grid-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>,
        <span class="summary-sig-arg">simobj</span>,
        <span class="summary-sig-arg">sched_trans</span>,
        <span class="summary-sig-arg">metasched</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">machine_factory</span>=<span class="summary-sig-default">MachineFactory()</span>,
        <span class="summary-sig-arg">ce_speed</span>=<span class="summary-sig-default">-1</span>,
        <span class="summary-sig-arg">**kwds</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.grid_sim-pysrc.html#Grid.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.grid_sim.Grid-class.html#add_site" class="summary-sig-name">add_site</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">site</span>)</span><br />
      Adds an existing Site object to the Grid (and metascheduler, if 
      used).</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.grid_sim-pysrc.html#Grid.add_site">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.grid_sim.Grid-class.html#remove_site" class="summary-sig-name">remove_site</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">site</span>)</span><br />
      Removes a Site from the Grid (and metascheduler, if used) using a 
      reference to the Site object.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.grid_sim-pysrc.html#Grid.remove_site">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.grid_sim.Grid-class.html#get_site" class="summary-sig-name">get_site</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>)</span><br />
      Returns:
      reference to a Site object known to the grid, or raises an Exception 
      if no such site exists</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.grid_sim-pysrc.html#Grid.get_site">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.grid_sim.Grid-class.html#register_cluster" class="summary-sig-name">register_cluster</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">cluster</span>)</span><br />
      Registers a Cluster object with the cluster tracking map.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.grid_sim-pysrc.html#Grid.register_cluster">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="get_waiting_count"></a><span class="summary-sig-name">get_waiting_count</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns total number of jobs waiting across all sites</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.grid_sim-pysrc.html#Grid.get_waiting_count">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="get_total_queue_size"></a><span class="summary-sig-name">get_total_queue_size</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns total queue size (waiting+running) across all sites</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.grid_sim-pysrc.html#Grid.get_total_queue_size">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="get_completed_count"></a><span class="summary-sig-name">get_completed_count</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns total number of jobs completed on all sites</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.grid_sim-pysrc.html#Grid.get_completed_count">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.grid_sim.Grid-class.html#submit_job" class="summary-sig-name">submit_job</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">job</span>,
        <span class="summary-sig-arg">target</span>)</span><br />
      Submits a job to a target Site, if the Site name matches a Site 
      currently known to the Grid.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.grid_sim-pysrc.html#Grid.submit_job">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.grid_sim.Grid-class.html#add_submit_event" class="summary-sig-name">add_submit_event</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">time</span>,
        <span class="summary-sig-arg">job</span>,
        <span class="summary-sig-arg">target</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span><br />
      Schedules a job submission event at a time not in the past.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.grid_sim-pysrc.html#Grid.add_submit_event">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.grid_sim.Grid-class.html#add_ce" class="summary-sig-name">add_ce</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">ce_name</span>,
        <span class="summary-sig-arg">cluster_name</span>,
        <span class="summary-sig-arg">sched_name</span>,
        <span class="summary-sig-arg">speed</span>=<span class="summary-sig-default">None</span>)</span><br />
      Creates a new Site and adds the Site to the Grid.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.grid_sim-pysrc.html#Grid.add_ce">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.grid_sim.Grid-class.html#remove_ce" class="summary-sig-name">remove_ce</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">ce_name</span>)</span><br />
      Remove a Site from the Grid.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.grid_sim-pysrc.html#Grid.remove_ce">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.grid_sim.Grid-class.html#resize_cluster" class="summary-sig-name">resize_cluster</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">cluster_name</span>,
        <span class="summary-sig-arg">cpu_count</span>,
        <span class="summary-sig-arg">profile</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span><br />
      Resize an existing Cluster or create, register, and size a new 
      Cluster, if the cluster name is not already known to the Grid.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.grid_sim-pysrc.html#Grid.resize_cluster">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__format__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__sizeof__</code>,
      <code>__str__</code>,
      <code>__subclasshook__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>,
        <span class="sig-arg">simobj</span>,
        <span class="sig-arg">sched_trans</span>,
        <span class="sig-arg">metasched</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">machine_factory</span>=<span class="sig-default">MachineFactory()</span>,
        <span class="sig-arg">ce_speed</span>=<span class="sig-default">-1</span>,
        <span class="sig-arg">**kwds</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.grid_sim-pysrc.html#Grid.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>name</code></strong> (str) - Name of the grid system</li>
        <li><strong class="pname"><code>simobj</code></strong> - Reference to the simulator object</li>
        <li><strong class="pname"><code>sched_trans</code></strong> - Scheduler translation function (fn pointer), which instantiates a
          scheduler based on a single string argument containing the name 
          of the scheduler to create</li>
        <li><strong class="pname"><code>metasched</code></strong> - Top-level grid metascheduler, which will use every grid site as a
          metascheduling target (optional)</li>
        <li><strong class="pname"><code>machine_factory</code></strong> - MachineFactory instance to use when creating new clusters (see <a
          href="simvoc.core.cluster_sim.MachineFactory-class.html" 
          class="link">cluster_sim.MachineFactory</a>)</li>
        <li><strong class="pname"><code>ce_speed</code></strong> (number) - Default speed (bytes/sec) of file caches on new CEs added to the 
          grid with the add_ce method. Set to zero zero for instantaneous 
          transfers, -1 to inhibit creation of FileCache objects.</li>
        <li><strong class="pname"><code>kwds</code></strong> - Extra data to be stored in the Grid object</li>
    </ul></dd>
    <dt>Overrides:
        object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="add_site"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">add_site</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">site</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.grid_sim-pysrc.html#Grid.add_site">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Adds an existing Site object to the Grid (and metascheduler, if used).
  If a new Site needs to be created, use add_ce instead.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>site</code></strong> - Site object to add to the Grid</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="remove_site"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">remove_site</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">site</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.grid_sim-pysrc.html#Grid.remove_site">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Removes a Site from the Grid (and metascheduler, if used) using a 
  reference to the Site object. To remove a Site by name, use remove_ce 
  instead.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>site</code></strong> - Site object to remove from the Grid</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="get_site"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">get_site</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.grid_sim-pysrc.html#Grid.get_site">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>name</code></strong> (str) - Name of the site to obtain</li>
    </ul></dd>
    <dt>Returns:</dt>
        <dd>reference to a Site object known to the grid, or raises an 
          Exception if no such site exists</dd>
  </dl>
</td></tr></table>
</div>
<a name="register_cluster"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">register_cluster</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">cluster</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.grid_sim-pysrc.html#Grid.register_cluster">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Registers a Cluster object with the cluster tracking map. To create a 
  new Cluster object, simply call resize_cluster with a cluster_name not 
  currently tracked by the Grid.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>cluster</code></strong> - Cluster object to track</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="submit_job"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">submit_job</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">job</span>,
        <span class="sig-arg">target</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.grid_sim-pysrc.html#Grid.submit_job">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Submits a job to a target Site, if the Site name matches a Site 
  currently known to the Grid. If the name match fails, the job is flagged 
  with an error condition, and a JobResult is created and sent to the 
  simulator so that the error can be recorded.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>job</code></strong> - Job object to submit</li>
        <li><strong class="pname"><code>target</code></strong> (str) - Site name to which the job should be sent. If the site name is an
          empty string (&quot;&quot;) and the optional grid-wide 
          metascheduler is in use, then the job will be submitted to the 
          metascheduler.</li>
    </ul></dd>
    <dt>Returns:</dt>
        <dd>simulator results collection</dd>
  </dl>
</td></tr></table>
</div>
<a name="add_submit_event"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">add_submit_event</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">time</span>,
        <span class="sig-arg">job</span>,
        <span class="sig-arg">target</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.grid_sim-pysrc.html#Grid.add_submit_event">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Schedules a job submission event at a time not in the past.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>time</code></strong> (number) - Time at which job submission should occur</li>
        <li><strong class="pname"><code>job</code></strong> - Job object to submit</li>
        <li><strong class="pname"><code>target</code></strong> (str) - Name of the site to which the job should be sent, or grid-wide 
          metascheduler if empty string</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="add_ce"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">add_ce</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">ce_name</span>,
        <span class="sig-arg">cluster_name</span>,
        <span class="sig-arg">sched_name</span>,
        <span class="sig-arg">speed</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.grid_sim-pysrc.html#Grid.add_ce">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Creates a new Site and adds the Site to the Grid. If the Cluster 
  providing machines to the Site does not have the specified scheduler, 
  then a new scheduler is also created.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>ce_name</code></strong> (str) - Name of the new Site</li>
        <li><strong class="pname"><code>cluster_name</code></strong> (str) - Name of the Cluster that provides machines to the Site. This 
          Cluster MUST be present in the cluster map, or an Exception will 
          be raised.</li>
        <li><strong class="pname"><code>sched_name</code></strong> (str) - Name of the scheduler to be used with the Site. If the scheduler 
          is not already present on the back-end Cluster, it will be 
          created using the scheduler translation function specified for 
          this Grid.</li>
        <li><strong class="pname"><code>speed</code></strong> (number) - Speed of site file cache, which will be added to the scheduler's 
          resource broker as the &quot;vmstore&quot; resource. Set to zero 
          for instantaneous transfers, or a negative number to disable 
          cache creation. Set to None (default) to use the default speed 
          set in the grid constructor.</li>
    </ul></dd>
    <dt>Returns:</dt>
        <dd>reference to the newly created site</dd>
  </dl>
</td></tr></table>
</div>
<a name="remove_ce"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">remove_ce</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">ce_name</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.grid_sim-pysrc.html#Grid.remove_ce">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Remove a Site from the Grid. Upon removal, any jobs running on the 
  Site will be terminated and given an error status.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>ce_name</code></strong> (str) - Name of the Site to remove</li>
    </ul></dd>
    <dt>Returns:</dt>
        <dd>reference to the deleted site</dd>
  </dl>
</td></tr></table>
</div>
<a name="resize_cluster"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">resize_cluster</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">cluster_name</span>,
        <span class="sig-arg">cpu_count</span>,
        <span class="sig-arg">profile</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.grid_sim-pysrc.html#Grid.resize_cluster">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Resize an existing Cluster or create, register, and size a new 
  Cluster, if the cluster name is not already known to the Grid. The 
  resulting Cluster size must not be negative, or an Exception will be 
  raised. When removing CPU cores from a cluster, idle cores will be 
  selected for removal, if available. If there are insufficient idle cores 
  to satisfy the removal request, then cores will be selected at random, 
  and the jobs running on those cores will be killed.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>cluster_name</code></strong> (str) - Name of Cluster to resize. If this Cluster does not exist, it 
          will be created with zero CPU cores and then immediately resized.</li>
        <li><strong class="pname"><code>cpu_count</code></strong> (int) - Number of CPU cores to add (positive) or remove (negative) from 
          the Cluster.</li>
        <li><strong class="pname"><code>profile</code></strong> (str) - Profile name for any new machines</li>
    </ul></dd>
    <dt>Returns:</dt>
        <dd>reference to the cluster</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="simvoc-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >SimVOC</th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0 on Fri Oct 23 11:04:30 2009
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
